Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
(Nginx Windows) nginx: [emerg] unknown directive "serversupstream"

I got this code while executing nginx:

nginx: [emerg] unknown directive "serversupstream" in C:\nginx-1.17.9/conf/nginx.conf:15

This is my nginx.conf:

#user  nobody;
worker_processes  1;
events {
  worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;

    # List of application 
    serversupstream portal_server {
      server 127.0.0.1:9510;
    }
    upstream portal_web_server {
      server 127.0.0.1:8085;
    }
    server {
      listen       8001;
      server_name  localhost;
      location /api {
          proxy_pass <http://portal_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /dte {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /simulacion {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
    }
    include servers/*;
}

I don't know that error message, what it is?

EDIT:

According to http://nginx.org/en/docs/dirindex.htm there is no serversupstream I don't understand, I'm just using a nginx.conf that many other guys in the team are using, but they are on mac and/or linux, I'm the only one in Windows.

So, I change serversupstream to upstream and there it triggers another error, it's complaining about the prefix for:

proxy_pass <http://portal_web_server;>

So I change removed those <> and there I tried again, now nginx doesn't show anything in the console... just this:

enter image description here

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

change encoding of the configfile to Utf8. Don't use built'in Notepad.exe to Save as to Uft8, it will save as Utf8 BOM. Use Notepad++ or other editor.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda